
package com.gzbsoft.sc.modules.sys.controller;
import com.gzbsoft.sc.common.annotation.SysLog;
import com.gzbsoft.sc.common.utils.R;
import com.gzbsoft.sc.modules.sys.entity.SysRole;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;

import java.util.Map;
@Api("角色管理")
@RestController
@RequestMapping("/sys/role")
public class SysRoleController extends AbstractController {
    @ApiOperation("角色列表")
    @GetMapping("/list")
    @RequiresPermissions("sys:role:list")
    public R list(@RequestParam Map<String, Object> params) {
        return R.ok().setPage(null);
    }
    @ApiOperation("角色列表")
    @GetMapping("/select")
    @RequiresPermissions("sys:role:select")
    public R select() {
        return R.ok().setList(null);
    }
    @ApiOperation("角色信息")
    @GetMapping("/{roleId}")
    @RequiresPermissions("sys:role:info")
    public R info(@PathVariable("roleId") Long roleId) {
        return R.ok().setObj(null);
    }
    @ApiOperation("保存角色")
    @SysLog("保存角色")
    @PutMapping("/")
    @RequiresPermissions("sys:role:save")
    public R save(@RequestBody SysRole role) {
        return R.ok();
    }
    @ApiOperation("修改角色")
    @SysLog("修改角色")
    @PostMapping("/")
    @RequiresPermissions("sys:role:update")
    public R update(@RequestBody SysRole role) {
        return R.ok();
    }
    @ApiOperation("删除角色")
    @SysLog("删除角色")
    @DeleteMapping("/")
    @RequiresPermissions("sys:role:delete")
    public R delete(@RequestBody Long[] roleIds) {
        return R.ok();
    }
}
